package com.party.web.web.dto.output.wechat;

import com.party.core.model.wechat.WechatMaterial;
import com.party.core.model.wechat.WechatMenu;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * Created by wei.li
 *
 * @date 2017/8/29 0029
 * @time 17:21
 */
public class WechatMenuOutput extends WechatMenu {

    //子菜单
    private List<WechatMenuOutput> subList;

    //选中的素材
    private List<WechatMaterial> material;

    public List<WechatMenuOutput> getSubList() {
        return subList;
    }

    public void setSubList(List<WechatMenuOutput> subList) {
        this.subList = subList;
    }

    public List<WechatMaterial> getMaterial() {
        return material;
    }

    public void setMaterial(List<WechatMaterial> material) {
        this.material = material;
    }

    public static WechatMenuOutput transform(WechatMenu wechatMenu){
        WechatMenuOutput wechatMenuOutput = new WechatMenuOutput();
        BeanUtils.copyProperties(wechatMenu, wechatMenuOutput);
        return wechatMenuOutput;
    }
}
